package com.zfp.front.controller;

import com.zfp.sys.entity.SysUser;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;

/**
 * Created by 飞蓬 on 2018/4/28.
 */
@Controller
public class FrontController {

    @RequestMapping("tofrontmain")
    public String tofrontmain(){
        return "frontpages/frontmain";
    }
    @RequestMapping("tofrontloginedmain")
    public String tofrontloginedmain(HttpSession session){
        SysUser sysUser = (SysUser) session.getAttribute("sessionUser"); //获取用户
        session.setAttribute("sessionUser",sysUser);
        return "frontpages/frontloginedmain";
    }
    @RequestMapping("tofronthome")
    public String tofronthome(){
        return "frontpages/home";
    }
    @RequestMapping("toregister")
    public String toregister(Model model ){
        return "frontpages/register";
    }
}
